@echo off

Set PackageVersion=2.03

Set      Quanta_Uti_Name=HPBQ184.exe
Set     Wistron_Uti_Name=HPBW095.exe
Set      Compal_Uti_Name=HPBC352.exe
Set    Inventec_Uti_Name=HPBI193.exe
Set Flextronics_Uti_Name=HPBFL237.exe
Set          bNB_Uti_Name=HpSet152.exe
Set     Foxconn_Uti_Name=HPBFO066.exe
Set    Pegatron_Uti_Name=HPBP121.exe

call setyear
call iden

IF ERRORLEVEL 13 goto CHKVENDOR
IF ERRORLEVEL 12 goto ChkManu
IF ERRORLEVEL 11 goto ChkDmiEntry
IF ERRORLEVEL 10 goto bNP2012
IF ERRORLEVEL 9 goto Pegatron
IF ERRORLEVEL 8 goto Foxconn
IF ERRORLEVEL 7 goto bNB
IF ERRORLEVEL 6 goto Flextronics
IF ERRORLEVEL 5 goto HP
IF ERRORLEVEL 4 goto IEC
IF ERRORLEVEL 3 goto Compal
IF ERRORLEVEL 2 goto Wistron
IF ERRORLEVEL 1 goto Quanta
IF ERRORLEVEL 0 goto CHKVENDOR
goto 10

:Quanta
rem echo 1 Quanta
call %Quanta_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:Wistron
rem echo 2 Wistron
call %Wistron_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:Compal
rem echo 3 Compal
call %Compal_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:IEC
rem echo 4 Inventec
call %Inventec_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:HP
rem echo 5 HP
echo Manufacturer name programming error, current setting is: Hewlett-Packard in Type2/3
goto exit

:Flextronics
rem echo 6 Flextronics
call %Flextronics_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:bNB
rem echo 7 bNB
echo ************************************************************
echo *** You must program Serial number and other information ***
echo *** before running Branding tool to commit vPro/AMT      ***
echo ************************************************************
pause
call %bNB_Uti_Name% 
pause
if exist 08me.flg del 08me.flg
if exist 09me.flg del 09me.flg
if exist 11me.flg del 11me.flg
call amtsupp.exe
IF ERRORLEVEL 1 goto call_brand
goto exit

:call_brand
if exist 11me.flg goto 11me
call brand.bat
goto exit

:11me
echo ********************************************************
echo *** Please use EFI tool Brand11 to commit AMT and AT ***
echo ********************************************************
pause
type Brand11.txt
goto exit

:Foxconn
rem echo 8 Foxconn
call %Foxconn_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:Pegatron
rem echo 9 Pegatron
call %Pegatron_Uti_Name% /SetHPVer %PackageVersion%
goto exit

:bNP2012
echo Please boot to windows and use wndmifit.exe to program DMI information
echo If the MPM mode is locked, escalate to 3LS to get SMC blob to unlock MPM
echo ********************************************************
echo *** Please use EFI tool Brand12 to commit AMT and AT ***
echo ********************************************************
goto exit

:12
echo Error --> Can't find the valuable Manufacturer information
goto exit

:CHKVENDOR
echo Vendor code not support in this package
goto exit

:11
echo unexpect error
goto exit


:exit
